package com.ycMc.mapper;

import com.ycMc.domain.Order;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

/**
 * Created by libo2 on 2017/8/15.
 */
@Repository
public interface OrderMapper {

    public void insert(Order order);
    public void delete(@Param("orderId")String orderId);
    public void update(Order order);
    public List<Order> select(@Param("orderId")String  orderId,
                                      @Param("userId")String  userId,
                                      @Param("orderState")int  orderState,
                                      @Param("userPhone")String  userPhone,
                                      @Param("realName")String  realName,
                                      @Param("fareStatus")int  fareStatus,
                                      @Param("taxStatus")int taxStatus,
                                      @Param("offset")int offset,@Param("pageSize")int pageSize);
    public Order selectOne(@Param("orderId")String orderId);

    public List<Order> query(@Param("orderId")String  orderId,
                             @Param("userId")String  userId,
                             @Param("orderState")int  orderState,
                             @Param("userPhone")String  userPhone,
                             @Param("realName")String  realName,
                             @Param("fareStatus")int  fareStatus,
                             @Param("shoppingAddress")String shoppingAddress,
                             @Param("taxStatus")int taxStatus,
                             @Param("startTime")long startTime,
                             @Param("endTime")long endTime,
                             @Param("offset")int offset,@Param("pageSize")int pageSize);



    public List<HashMap> getChartByTimeYears(@Param("userId")String userId);

    public List<HashMap> getChartByTimeMonths(@Param("userId")String userId);

    public List<HashMap> getChartByTimeDays(@Param("userId")String userId);
}
